package graphes;

import java.io.Serializable;


public abstract class Arc implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	static int compteur=1;
	protected int numero;
	protected Noeud debut,fin;
	public Arc(){
		
	}
	public Arc(Noeud deb,Noeud fin){
		numero=compteur;
		compteur=compteur+1;
		this.debut=deb;
		this.fin=fin;
	}
	
	public abstract double getPoids();
	public int getNumero() {
		return numero;
	}
	public void setNumero(int numero) {
		this.numero = numero;
	}
	public Noeud getDebut() {
		return debut;
	}
	public void setDebut(Noeud debut) {
		this.debut = debut;
	}
	public Noeud getFin() {
		return fin;
	}
	public void setFin(Noeud fin) {
		this.fin = fin;
	}
	public String toString(){
		return (debut+"->"+fin); 
	}
	
}
